home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C++ / Applications / PICSee Dust 1.01 / Primary Source / PICSDialogs.cpp < prev    next >
C/C++ Source or Header  |  1995-11-13  |  424b  |  19 lines

  1. #include "PICSDialogs.h"
  2. #include "DialogUtils.h"
  3. #include "KeyUtils.h"
  4.  
  5. Boolean CheckValidNumeral(DialogPtr theDlog, short theItem, long *result) {
  6.     Str31 dlogStr;
  7.     
  8.     GetIText(GetDItemHdl(theDlog, theItem), dlogStr);
  9.     if (StrNumberOnly(dlogStr, false, false)) {
  10.         StringToNum(dlogStr, result);
  11.     }
  12.     else {
  13.         SelIText(theDlog, theItem, 0, 32767);
  14.         SysBeep(10);
  15.         return(false);
  16.     }
  17.     
  18.     return(true);
  19. } // END CheckValidNumeral